package com.rich.house.service.impl;


import com.rich.common.entity.TbWantHouse;
import com.rich.house.mapper.WantHouseMapper;
import com.rich.house.service.WantHouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @author hu
 */
@Service
public class WantHouseServiceImpl implements WantHouseService {

    @Autowired
    private WantHouseMapper wantHouseMapper;

    @Override
    public List<TbWantHouse> wantHouseList() {
        return wantHouseMapper.wantHouseList();
    }

    @Override
    public void addWantHouse(TbWantHouse wantHouse) {
        wantHouse.setCreateTime(new Date());
        wantHouse.setIsDelete("0");
        wantHouseMapper.addWantHouse(wantHouse);
    }

    @Override
    public void deleteWantHouse(Long id, String status) {
        wantHouseMapper.deleteWantHouse(id,status);
    }

}
